//引入插件，用来解析上传的;
import KoaBody from 'koa-body';
//登录：
import Login from '../api/login/login';
import isLogin from '../middle/isLogin';
//主页菜单;
import Menu from '../api/menu/menu';
//用户列表;
import Account from '../api/account';
//用户列表;
import User from '../api/user';
//角色列表;
import Role from '../api/role';
//学生列表;
import Student from '../api/student';
//班级列表;
import Class from '../api/class';
//文件上传；
import Temp from '../api/upload';
//导出;
export default [{
    //登录;
    method:'post',
    url:'/login',
    callback:[Login.LoginIn],
},{
    //退出;
    method:'get',
    url:'/loginout',
    callback:[Login.LoginOut],
},{
    //登录拦截;
    method:'get',
    url:'/isLogin',
    callback:[isLogin]
},{
    //修改密码;
    method:'post',
    url:'/changepassword',
    callback:[Login.ChangePassword],
},{
    //菜单;
    method:'get',
    url:'/menu',
    callback:[Menu.HomeMenus],
},{
    //角色权限;
    method:'get',
    url:'/roleper',
    callback:[Menu.roleper],
},{
    //用户列表;
    method:"post",
    url:'/accountlist',
    callback:[Account.AccounList],
},{
    method:'get',
    url:'/getCurriculum',
    callback:[Account.getCurriculum],
},{
    method:'get',
    url:'/getSchool',
    callback:[Account.getSchool],
},{
    //用户列表获取
    method:'get',
    url:'/user/showUserList',
    callback:[User.showUserData],
},{
    //用户添加
    method:'post',
    url:'/user/userAdd',
    callback:[User.userAdd],
},{
    //用户编辑
    method:'post',
    url:'/user/userListEdit',
    callback:[User.userEdit],
},
{   //用户冻结
    method:'post',
    url:'/user/userListFreeze',
    callback:[User.userFreeze],
},
{   //用户搜索
    method:'post',
    url:'/user/userListSearch',
    callback:[User.userSearch],
},
{   //黑名单
    method:'get',
    url:'/user/userBlackList',
    callback:[User.userBlackList],
},{  
    //用户黑名单搜索
    method:'post',
    url:'/user/userBlackListSearch',
    callback:[User.userBlackListSearch],
},{
    //角色列表;
    method:'get',
    url:'/role/showRoleList',
    callback:[Role.showRoleData],
},{
    //角色搜索;
    method:"post",
    url:'/role/ListSearch',
    callback:[Role.roleSearch],
},{
    //角色添加;
    method:'post',
    url:'/role/roleListAdd',
    callback:[Role.roleAdd],
},{
    //角色添加相关信息
    method:'get',
    url:'/role/roleLimits',
    callback:[Role.rolethings],
},{
    //角色编辑;
    method:'post',
    url:'/role/roleListEdit',
    callback:[Role.roleEdit],
},{
    //角色冻结
    method:'post',
    url:'/role/roleFreeze',
    callback:[Role.roleFreeze],
},{
    //获取下拉选中的角色
    method:'get',
    url:'/role/getRole',
    callback:[Role.getRole],
},{
    //学生列表;
    method:'get',
    url:'/student/list',
    callback:[Student.showStudentList],
},{
    //座位表;
    method:'post',
    url:"/student/getSeat",
    callback:[Student.getSeat],
},{
     //添加学生
     method:'post',
     url:'/student/studentAdd',
     callback:[Student.studentsAdd],
},{
      //编辑学生
    method:'post',
    url:'/student/studentEdit',
    callback:[Student.studentsEdit],
},{
    //查找学生
    method:'post',
    url:'/student/studentSerch',
    callback:[Student.studentSerch],
},{
    //获取班级列表;
    method:'get',
    url:'/class/classList',
    callback:[Class.showClassList],
},{
    //获取列表;
    method:'get',
    url:'/class/getLists',
    callback:[Class.getLists],
},{
    //添加班级;
    method:'post',
    url:'/class/addClass',
    callback:[Class.addClass],
},{
    //开课接口;
    method:'post',
    url:'/class/startLesson',
    callback:[Class.startLesson],
},{
    //结课接口;
    method:'post',
    url:'/class/endlesson',
    callback:[Class.endlesson],
},{
    //获取详情列表;
    method:'post',
    url:'/class/getClassRecords',
    callback:[Class.getClassRecords],
},{
    //班级搜索
    method:'post',
    url:'/class/classSearch',
    callback:[Class.classSearch],
},{
    //获取班级相关信息;
    method:'post',
    url:'/class/getClassSituation',
    callback:[Class.getClassSituation],
},{
    //添加班级日志接口;
    method:'post',
    url:'/class/addClassSituation',
    callback:[Class.addClassSituation],
},{
    //获取模板数据;
    method:'get',
    url:'/temp/templatelist',
    callback:[Temp.TemplateList],
},{
    //文件提交;
    method:'post',
    url:'/temp/templateadd',
    callback:[Temp.TemplateAdd],
},{
    //文件上传;
    method:'post',
    url:'/temp/templateupload',
    callback:[KoaBody({
        multipart:true,
        formidable:{
            maxFieldsSize:1024*1024*200
        }
    }),Temp.TemplateUploadFiles],
},{
    //模板搜索;
    method:'post',
    url:'/temp/templatesearch',
    callback:[Temp.TemplateSearch],
},{
    //录屏上传;
    method:'post',
    url:'/temp/addTemplateBaidu',
    callback:[Temp.addTemplateBaidu],
},{
    //录屏数据
    method:'get',
    url:'/temp/showTemplateBaidu',
    callback:[Temp.showTemplateBaidu],
}]